problem with missile lock
I'm sorry with noob question but I finally tried EE twice this week with friends (Just 2 years that I was waiting for this moment). I love this game.
I translate some scenarios and we loved experience.
I don't understand why sometimes is difficult to lock ships with homing or nuke? Even being at a good distance?
is it due to some protection characteristics of ships?
Please look picture :
Thanks
I translate some scenarios and we loved experience.
I don't understand why sometimes is difficult to lock ships with homing or nuke? Even being at a good distance?
is it due to some protection characteristics of ships?
Please look picture :
Thanks
Comments
Code that calculates the solution is actually quite complex.
https://github.com/daid/EmptyEpsilon/blob/3646a96efb32b974e0e9c4bf5ea73911cb37cfa9/src/spaceObjects/spaceshipParts/weaponTube.cpp#L312
In my 3D NPC torpedo code in SNIS, I do the following, and it seems to work surprisingly well.
(torpedoes travel in a straight line with constant velocity)
1. Calculate distance d to target.
2. Compute the time t it takes for a torpedo to travel at fixed velocity distance d.
3. Multiply velocity vector v of target by t to get presumed position of target at time torpedo will approximately intercept it. (note that by the time the torpedo reaches the target, distance d may no longer be accurate, as the target will have moved I just ignore this fact that d is approximate.)
4. Shoot torpedo in the direction of this computed approximate intercept point.
It might work "surprisingly well" because my torpedoes only have to get so close before inflicting damage.
For the homing missiles (which steer as they travel), I do almost the same thing, except it's done multiple times, once for every step the missile moves, and the missile doesn't change direction instantly, instead a "desired velocity" is computed, and the missile's velocity is gradually modified towards this desired velocity. I don't even do a fancy quaternion slerp, I just lerp vx, vy, and vz independently. This works surprisingly well.
These were both cases in which I implemented "the dumbest thing that might work", thinking I'd have to go back and refine it, but nope, it just pretty much worked in its dumb form.
(It's quite possible I don't really understand what the EE firing solution code is doing and I've just babbled a load of irrelevant nonsense above, though.)
Homing missiles readjust themselfs to aim towards the target when they are close enough. But the targeting code does not account for that.
I think there is a mistake in science_db.lua
item = weapons:addEntry('Mine')
item:addKeyValue('Drop distance', '1.2u') It's 1U in truth
item:addKeyValue('Trigger distance', '0.6u') It's 0.8U in truth